;; --- User Interface ---
(require 'Hesperus-UI)


;; --- config for diff langs ---

(require 'init-lazycat-modules)
;;; including packages below:
;; awesome-tab
;; init-awesome-pair
;; color-rg
;; company-english-helper
;; insert-translated-name
;; open-newline like vi
;; thing-edit

;; (require 'init-paredit)

(require 'init-org-mode)

(require 'init-perl)

;; (require 'init-python)

(require 'init-tex)

;; (require 'fasta)


;; disable left mouse button click paste
(setq  mouse-yank-at-point t)
;; disable middle mouse button click
(global-unset-key (kbd "<mouse-2>"))
;; disable the right mouse button and double click to cut
(fset 'mouse-save-then-kill 'ignore)

;; change default quoted char radix 8, alter option:10/16
(setq read-quoted-char-radix 16)

;; garbage-collection
(when (eq system-type 'windows-nt)
  (setq gc-cons-threshold (* 512 1024 1024))
  (setq gc-cons-percentage 0.5)
  (run-with-idle-timer 5 t #'garbage-collect)
  ;; display garbage-collection-messages
  ;; (setq garbage-collection-messages t)
  )

;; global utf-8 in win
(when (and (eq system-type 'windows-nt)
           (eq w32-ansi-code-page 65001))
  (setq w32-system-coding-system 'utf-8)
  (define-coding-system-alias 'cp65001 'utf-8))

;; improve within prog-mode
(add-hook 'prog-mode-hook
          (lambda ()
            ;; aggressive-indent
            (aggressive-indent-mode)
            ;; highlight current column
            (highlight-indentation-current-column-mode)))


;; config for imenu-list to display current buffer's imenu entries
(global-set-key (kbd "s-'") #'imenu-list-smart-toggle)
(setq imenu-list-focus-after-activation t)
(setq imenu-list-auto-resize t)
(setq imenu-list-after-jump-hook nil)
(add-hook 'imenu-list-after-jump-hook #'recenter-top-bottom)
(setq imenu-list-position 'left)


(require 'Hesperus-keybindings)

(provide 'Hesperus-attachment)
